package com.ambulance.project.biz.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 病员急救信息表
 * </p>
 *
 * @author zr
 * @since 2020-04-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("biz_patient")
@ApiModel(value="Patient对象", description="病员急救信息表")
public class Patient extends Model<Patient> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "病人ID")
    @TableId(value = "patientId", type = IdType.AUTO)
    private Integer patientId;

    @ApiModelProperty(value = "120调度流水标识")
    @TableField("trans_120")
    private String trans120;

    @ApiModelProperty(value = "姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "联系人电话")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "病症")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "性别 0=未知,1=男,2=女")
    @TableField("sex")
    private Integer sex;

    @ApiModelProperty(value = "年龄")
    @TableField("age")
    private Integer age;

    @ApiModelProperty(value = "病人住址")
    @TableField("address")
    private String address;

    @ApiModelProperty(value = "报警人电话")
    @TableField("call_phone")
    private String callPhone;

    @ApiModelProperty(value = "录入时间")
    @TableField("time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime time;

    @ApiModelProperty(value = "病发地点")
    @TableField("patient_local")
    private String patientLocal;

    @ApiModelProperty(value = "病人录音文件")
    @TableField("patient_records")
    private String patientRecords;

    @ApiModelProperty(value = "接警时间")
    @TableField("receive_notice_time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime receiveNoticeTime;

    @ApiModelProperty(value = "标识调度员是否处理(1=处理 0=未处理)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "身份证号")
    @TableField("patient_card")
    private String patientCard;

    @ApiModelProperty(value = "来电类型0普通救护车，1卒中救护车")
    @TableField("phone_type")
    private Integer phoneType;

    @ApiModelProperty(value = "医院标识")
    @TableField("uid")
    private Integer uid;

    @ApiModelProperty(value = "主诉")
    @TableField("major_case")
    private String majorCase;

    @ApiModelProperty(value = "目标医院")
    @TableField("hospital")
    private String hospital;

    @ApiModelProperty(value = "体检结果")
    @TableField("check_result")
    private String checkResult;

    @ApiModelProperty(value = "初步诊断")
    @TableField("first_treat")
    private String firstTreat;


    @Override
    protected Serializable pkVal() {
        return this.patientId;
    }

}
